using System.Collections.Generic;
using System.Linq;
using TelerikMvcGridCustomBindingHelper.Util;

namespace TelerikMvcGridCustomBindingHelper.Aggregates
{
    public class AggregatesContainer
    {
        public AggregatesContainer()
        {
            _functions = new Dictionary<string, object>();
        }

        private readonly Dictionary<string, object> _functions;

        public AggregatesContainer AddOrSet(AggregateMethod aggregateMethod, object value)
        {
            _functions[aggregateMethod.GetStringValue()] = value;
            return this;
        }

        public Dictionary<string, object> GetValues()
        {
            return _functions;
        }
    }
}